//
//  CartViewController.m
//  AppleCilent
//
//  Created by Nail Sharipov on 06/04/14.
//  Copyright (c) 2014 Nail Sharipov. All rights reserved.
//

#import "CartViewController.h"
#import "CartManager.h"

@interface CartViewController ()

@end

@implementation CartViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self.cartTable reloadCart];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)backButtonPressed:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (IBAction)checkoutButtonPressed:(id)sender {
    [[CartManager getInstance] sendOrder];
}

@end
